package de.uni_mannheim.informatik.semanticDating.webView;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;

@Path("user/{userId}")
public class ViewProfile {

	@GET
	@Path("page")
	@Produces(MediaType.TEXT_HTML)
	public String returnHtml(@PathParam("userId") String userId) {

		return "<html><h1>Profile of " + userId + "</h1></html>";
	}

	@GET
	@Path("data")
	@Produces(MediaType.APPLICATION_XML)
	public String returnXmlRdf(@PathParam("userID") String userId) {

		return "<?xml version=\"1.0\"> <user id=" + userId + " \\>";
	}

	@GET
	@Produces(MediaType.TEXT_HTML)
	public String returnReferrer(@PathParam("userId") String userId,
			@Context HttpHeaders httpHeader) {

		return "<html><h1>Here should be the HTTP 303 Referrer for " + userId
				+ "</h1></html>";
	}
}
